package com.dure.hotmemory.controllers;


import com.dure.hotmemory.bean.Bean;
import com.dure.hotmemory.bean.Recommend;
import com.dure.hotmemory.config.Config;
import com.dure.hotmemory.scenes.AppScene;

import java.util.HashMap;

/**
 * Created by dure on 2017/4/26.
 */

public class AppController extends Controller {
    AppScene appScene;

    public AppController(AppScene baseScene) {
        super(baseScene);
        appScene = baseScene;
    }

    public void checkShouldShowRecommend() {

        HashMap<String, String> paramMap = new HashMap<>();
        requestModel.doGet(Config.HOST + Config.SHOW_RECOMMEND, paramMap, Recommend.class);
    }

    @Override
    public void handleRequestSuccess(Bean bean) {
        Recommend recommend = (Recommend) bean;
        appScene.setRecommendData(recommend);
    }
}
